﻿using MVCManage.Model;
using MVCManage.Model.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace MVCManage.BLL
{
    public class HJQ_store_infoBLL : BaseBLL<HJQ_store_info>
    {
        public override void SetDal()
        {
            Dal = new BaseDAL<HJQ_store_info>();
        }
        //分页
        public List<HJQ_store_info> GetUsersByPage(int  page,int limit,string name, out int count) 
        {
            var data = Dal.Query();
            if (!string.IsNullOrEmpty(name))
            {
                data.Where(a=>a.shopName==name);
            }
             count=data.Count();
            var list = data.OrderBy(a => a.AddressID).Skip((page - 1) * limit).Take(limit);
            return list.ToList();
        } 
    }
}
